<template>
    <div>
        <div class="year-data">
            <countTo prefix="￥" :decimals="decimals" :startVal='0' :endVal='totalData.total' :duration=8000></countTo>
        </div>
        <div class="data-item-box clear-float">
            <div class="data-item">
                <span class="total-label">本年</span>
                <countTo prefix="￥" :decimals="decimals" :startVal='0' :endVal='totalData.year' :duration=4000></countTo>
            </div>
            <div class="data-item">
                <span class="total-label">本月</span>
                <countTo prefix="￥" :decimals="decimals" :startVal='0' :endVal='totalData.mouth' :duration=4000></countTo>
            </div>
            <div class="data-item">
                <span class="total-label">本日</span>
                <countTo prefix="￥" :decimals="decimals" :startVal='0' :endVal='totalData.day' :duration=4000></countTo>
            </div>
        </div>
    </div>
</template>
<script>
    export default {
        name:'total',
        components: {
        },
        props: {
        },
        data () {
            return {
                decimals:2,
                totalData:{
                    total:2624803266.33,
                    year:236639781.25,
                    mouth:35639781.55,
                    day:5639781.55
                }
            }
        },
        computed: {
        },
        methods: {
            init(){
//                this.farmingData.map(function (currentValue,index,arr) {
//                    if(!parseInt((index+1)%3)){
//                        currentValue.classname='item'
//                    }else {
//                        currentValue.classname='item item-border'
//                    }
//                })
//                console.log(this.farmingData)
            }
        },
        mounted () {
            this.init()
        },
        created(){
        }
    }

</script>
<style type="text/css">
</style>